<template>
    <a-card :bordered="false">
        <a-spin :spinning="confirmLoading">
            <div class="table-operator">
                <a-button shape="round" size="small" type="primary" @click="handleEdit(model,'pricePactForm','编辑')">编辑</a-button>
            </div>
            <div style="margin:20px;background-color: #ffffff;" v-html="pactContent"></div>
        </a-spin>
        <pricePactForm ref="pricePactForm" @close="query" @ok="query"></pricePactForm>
    </a-card>
</template>

<script>
import request from '@/utils/request'
import {SysMixin} from '@/mixins/SysMixin'
import defaultSettings from '@/config/defaultSettings'
import pricePactForm from './pricePactForm'

export default {
    name:'pricePactFormDesc',
    components:{pricePactForm},
    mixins:[SysMixin],
    data(){
        return{
            defaultSettings,
            width:document.documentElement.clientWidth,
            model:{},
            labelCol:{sm: { span: 1 }},
            wrapperCol:{sm: { span: 23 }},
            confirmLoading:false,
            pactContent:null,
        }
    },
    created(){
       this.query()
    },
    mounted(){
       
    },
    methods:{
        query(){
            request.get('/KhyProtectPricePactController/queryProtectPricePact',{}).then(res=>{
                if(res.success){
                    this.model=res.result
                    this.pactContent = require('js-base64').Base64.decode(this.model.pactContent)
                }else{
                    this.$message.warning(res.message);
                }
            })
        }
    }
}
</script>